Random = Mock.Random

function checkUsername(){
    return{
        code : 200,
        msg : '用户名可以使用'
    }
}

function register(){
    return{
        code : 200,
        msg : '注册成功'
    }
}

Mock.mock('http://localhost/register.php','post', register)
Mock.mock(/http:\/\/localhost\/check_username.php.*?/,'get', checkUsername)
